const adminModel = require("../model/adminModel/adminModel")

const adminService = {
    //网站更新
    webupdated: (archivalLink,webTitle, archivalNum, informText) => {
        return adminModel.webupdated(archivalLink,webTitle, archivalNum, informText)
    },
    // 登录接口
    loginrequest: () => {
        return adminModel.loginrequest()
    },
    // 更改后台管理账号密码
    updateuser: (user_account, user_password) => {
        return adminModel.updateuser(user_account, user_password)
    },
    // 请求所有文章
    allblog: () => {
        return adminModel.allblog()
    },
    // 搜索文章
    search: (title) => {
        return adminModel.search(title)
    },
    // 删除文章
    deleteitem: (id) => {
        return adminModel.deleteitem(id)
    },
    // 更新文章
    updateitem: (contentId, title, contentHtml, createTimer, articleClassVal, CoverImageurl, author, articleTagVal, articledescribe) => {
        return adminModel.updateitem(contentId, title, contentHtml, createTimer, articleClassVal, CoverImageurl, author, articleTagVal, articledescribe);
    },

    // 添加轮播图
    addbanner: (imageurl, linkUrl, bannerName) => {
        return adminModel.addbanner(imageurl, linkUrl, bannerName)
    },

    // 添加轮播图
    getbanner: () => {
        return adminModel.getbanner()
    },
    // 删除轮播图
    deletebanner: (id) => {
        return adminModel.deletebanner(id)
    },

    // 请求分类列表
    getblogclass: () => {
        return adminModel.getblogclass()
    },
    // 添加单个分类
    addclassify: (classNameVal) => {
        return adminModel.addclassify(classNameVal)
    },
    // 删除单个分类
    deleteblogclass: (id) => {
        return adminModel.deleteblogclass(id)
    },
    // 删除分类
    deletecomment: (id) => {
        return adminModel.deletecomment(id)
    },

    // 评论列表
    commentlist: () => {
        return adminModel.commentlist()
    },
    // 搜索评论
    searchcomment: (searchValue) => {
        return adminModel.searchcomment(searchValue)
    },

    // 留言回复
    replymessage: (id, replyVal) => {
        return adminModel.replymessage(id, replyVal)
    }
}

module.exports = adminService